﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FJERP.BLL;
using FJERP.Model;


namespace FJERP
{
    public partial class SupplierAdd : System.Web.UI.Page
    {
        SupplierBLL bll = new SupplierBLL();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Supplier sur = new Supplier();
            sur.Supplier_Addr = this.Supplier_Addr.Value;
            sur.Supplier_Name = this.Supplier_Name.Value;
            sur.Supplier_People = this.Supplier_People.Value;
            sur.Supplier_Phone = this.Supplier_Phone.Value;
            if (bll.AddSupplier(sur) > 0)
            {
                Response.Write("<script>alert('添加成功!!!');location.href='SupplierShow.aspx'</script>");

            }
            else
            {
                Response.Write("<script>alert('添加失败!!!')</script>");
            }
        }
    }
}